﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MyOA.DAL;
using MyOA.Model;
namespace MyOA.BLL
{
    public class LoginLogManage
    {
        LoginLogService service = new LoginLogService();

        /// <summary>
        /// 根据登陆时间来获取登陆信息
        /// </summary>
        /// <param name="startTime">登陆时间</param>
        /// /// <param name="endTime">登陆时间</param>
        /// <param name="size">一页显示多少条数据</param>
        /// <param name="currentPage">当前是第几页</param>
        /// <param name="isCount">是否要进行计算总行数的操作0是进行，因为这个操作只进行一次</param>
        /// <param name="sum">out所有登陆信息的总数</param>
        /// <returns>返回符合条件的登陆信息</returns>
        public IList<LoginLog> getLoginLogByLoginTime(DateTime startTime, DateTime endTime, int size, int currentPage, int isCount, out int sum)
        {
            return service.getLoginLogByLoginTime(startTime, endTime, size, currentPage, isCount, out sum);
        }

        /// <summary>
        /// 根据登陆日志ID删除登陆日志
        /// </summary>
        /// <param name="loginLogId">登陆日志ID</param>
        /// <returns>删除成功与否</returns>
        public bool deleteLoginLogByLoginLogId(int loginLogId)
        {
            return service.deleteLoginLogByLoginLogId(loginLogId);
        }

        /// <summary>
        /// 根据登陆日志ID集合删除登陆日志
        /// </summary>
        /// <param name="loginLogIds">登陆日志ID集合</param>
        /// <returns>删除成功与否</returns>
        public bool deleteLoginLogByLoginLogId(string loginLogIds)
        {
            return service.deleteLoginLogByLoginLogId(loginLogIds);
        }
    }
}
